package com.fy.fyspace;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@SpringBootApplication //启动注解
@MapperScan("com.fy.fyspace.mapper") //mapper文件映射
@EnableAspectJAutoProxy(exposeProxy = true) //代理,开启以后可以在项目中使用AopContext.currentProxy()获取当前类的代理对象
public class FySpaceApplication {
    public static void main(String[] args) {
        SpringApplication.run(FySpaceApplication.class, args);
        System.out.println("项目启动成功");
    }

    @Bean
    public Jackson2JsonMessageConverter createMC(){
        return new Jackson2JsonMessageConverter();
    }

}
